package ex05.collection;


public class Student implements java.util.Comparator<Student>{
  private  String name;
  private  int    age;
  private  String serialNumber;
  public Student(){}
	public Student(String name, int age, String serialNumber) {
		this.name = name;
		this.age = age;
		this.serialNumber = serialNumber;
	}
	public  int  compare(Student s1, Student s2){
	    //return  s2.getAge() - s1.getAge();
		return  s1.getSerialNumber().compareTo(s2.getSerialNumber());
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the age
	 */
	public int getAge() {
		return age;
	}
	/**
	 * @param age the age to set
	 */
	public void setAge(int age) {
		this.age = age;
	}
	/**
	 * @return the serialNumber
	 */
	public String getSerialNumber() {
		return serialNumber;
	}
	/**
	 * @param serialNumber the serialNumber to set
	 */
	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}
	  
	  
}
